﻿namespace io.gitee.springsongs
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Program program = new Program();
            program.Sum();
            program.Sum(10, 20);
            int result = program.Sum1(10, 20);
            Console.WriteLine(result);
        }

        //方法定义无返回无参数
        void Sum()
        {
            int a = 10, b = 20;
            Console.WriteLine(a + b);
        }
        //方法定义无返回有参数
        void Sum(int a, int b)
        {
            Console.WriteLine(a + b);
        }
        //方法定义无返回有参数
        int Sum1(int a, int b)
        {
            return (a + b);
        }
    }
}